Skip to content

Conversation

@havarnov
Copy link

The code that tries to set a zero-space-non-braking space doesn't work as intended.

'workingNode.innerHTML = "&#feff;";' works differently in different browsers:
Chrome: parses the string a escapes the ampersand.
IE: fails with a 'XML5608' syntax error (see https://msdn.microsoft.com/en-us/library/dn423949(v=vs.85).aspx).

Corrected to use the correct 'String.fromCharCode(0xfeff)'.

The code that tries to set a zero-space-non-braking space doesn't work as intended.

'workingNode.innerHTML = "&#feff;";' works differently in different browsers:
Chrome: parses the string a escapes the ampersand.
IE: fails with a 'XML5608' syntax error (see https://msdn.microsoft.com/en-us/library/dn423949(v=vs.85).aspx).

Corrected to use the correct 'String.fromCharCode(0xfeff)'.
@havarnov
Copy link
Author

Didn't find the correct place to write a test, if a test is required any help would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant